<%@ page import="java.util.*" %>



<jsp:useBean id="phoneAccount" class="se2.PhoneAccount" scope="request"/>
<jsp:setProperty name="phoneAccount" property="*"/>

	
<% 
		int cid = Integer.valueOf(request.getParameter("cid"));
		int id = Integer.valueOf(request.getParameter("id"));
		
		phoneAccount = new se2.PhoneAccount(id);

		if (phoneAccount.removePhoneAccount())
		{
			out.println("Phone Removed");	
			String s = "viewCustomerAccountDetails.jsp?id=" + cid;
%>
			
		<jsp:forward page="<%= s %>" />

<%
	
		}
		else
		{
			String msg = phoneAccount.getMsg();
			out.println("Error Removing Phone Account");
			String s = "error.jsp?&url=viewCustomerAccountDetails.jsp?id=" + cid;
			if (msg.length() != 0)
			{
				s += "&msg=" + msg;
			}
%>
		<jsp:forward page="<%= s %>" />
			
<%
		}

%>
